<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="breadcrumbs">
            <h:form>
                <a href="index.xhtml">Website Admin</a><div class="breadcrumb_divider"></div>
                <h:commandLink action="#{registersController.prepareList()}" value="Registers" />
                <h:commandLink value="Assign faculty" class="current"/>
            </h:form>
        </ui:define>
        <ui:define name="body">
            <h:form styleClass="jsfcrud_list_form" id="form">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorClass="errorStyle" infoClass="infoStyle" layout="table" >
                    </h:messages>
                </h:panelGroup>

                <h:outputText escape="false" value="#{bundle.ListRegistersEmpty}" rendered="#{registersController.items.rowCount == 0}" class="infoStyle"> 
                </h:outputText>
                <article class="module width_full">
                    <header><h3>List of Register recounting</h3></header>
                    <div class="module_content">
                        <h:panelGrid columns="4" width="100%">
                            <h:outputLabel value="Id:"/>
                            <h:outputText id="reId" value="#{registersController.selected.reId}" title="#{bundle.EditRegistersTitle_reId}"/>
                            <h:outputLabel value=""/>
                            <h:outputLabel value=""/>
                            <h:outputLabel value="Create date:" />
                            <h:outputText id="createDate" value="#{registersController.selected.createDate}" title="#{bundle.EditRegistersTitle_createDate}" >
                                <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                            </h:outputText> 
                            <h:outputLabel value="Exam code:"  />
                            <h:outputLabel value="#{registersController.selected.id.examId.examId}"  />
                            <h:outputLabel value="Roll No.:"  />
                            <h:outputLabel value="#{registersController.selected.id.studentId.enRoll}"  />                    
                            <h:outputLabel value="Student name:"  />
                            <h:outputLabel value="#{registersController.selected.id.studentId.stuName}"  />
                            <h:outputLabel value="Subject:"  />
                            <h:outputLabel value="#{registersController.selected.id.examId.subjectId.suName}"  />
                            <h:outputLabel value="Assign to:" for="assignFac" />
                            <p:selectOneMenu id="assignFac" value="#{registersController.selected.assignFac}">
                                <f:selectItems value="#{registersController.allUserses}" var="fac" itemLabel="#{fac}" itemValue="#{fac}"/>
                            </p:selectOneMenu>
                        </h:panelGrid>
                        <div align="right">
                            <h:commandButton action="#{registersController.update}" value="#{bundle.EditRegistersSaveLink}"/>
                        </div>
                    </div></article>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
